// 租户管理
import axios from "@/request/axios";

// 新增租户
export function tenantAdd(params: any) {
  return axios({
    url: "/system/systemTenant/add",
    method: "post",
    data: params,
  });
}

// 删除租户
export function tenantDel(ids: any) {
  return axios({
    url: "/system/systemTenant/del",
    method: "post",
    data: ids,
  });
}

// 修改租户
export function tenantEdit(params: any) {
  return axios({
    url: "/system/systemTenant/edit",
    method: "post",
    data: params,
  });
}

// 根据租户Id获取租户信息
export function getTenantById(id: any) {
  return axios({
    url: "/system/systemTenant/detail",
    method: "post",
    data: { id }
  });
}

// 条件查询（分页）
export function tenantQuery(params:any) {
  return axios({
    url: "/system/systemTenant/query",
    method: "post",
    data: params
  });
}

// 重置租户密码
export function tenantInitPassword(id: any) {
  return axios({
    url: "/system/systemTenant/initPassword",
    method: "post",
    data: { id },
  });
}

// 查询租户菜单
export function tenantGetMenu(id: any) {
  return axios({
    url: "/system/systemTenant/getTenantMenu",
    method: "post",
    data: { id },
  });
}

// 分配租户菜单
export function tenantAssignMenu(params:any) {
  return axios({
    url: "/system/systemTenant/assignMenu",
    method: "post",
    data: params,
  });
}

